import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
/**
 * 存储登录用户信息的状态
 */
export const useCounterStore = defineStore('loginUser ', () => {
  const count = ref(0)
  //定义状态初始值
  //定义状态的技术逻辑 getter
  const doubleCount = computed(() => count.value * 2)
  //定义状态的修改技术逻辑
  function increment() {
    count.value++
  }

  return { count, doubleCount, increment }
})
